<template>
  <div>
    <div ref="chartRef" style="width: 600px;height:400px;"></div>
  </div>
</template>

<script>
import * as echarts from 'echarts/core'
console.log('echarts', echarts)
import { TitleComponent, LegendComponent } from 'echarts/components'
import { RadarChart } from 'echarts/charts'
import { CanvasRenderer } from 'echarts/renderers'
echarts.use([TitleComponent, LegendComponent, RadarChart, CanvasRenderer])
export default {
  name: 'Radar',
  components: {},
  data() {
    return {

    }
  },
  created() {},
  mounted() {
    var myChart = echarts.init(this.$refs.chartRef)
    // 绘制图表
    myChart.setOption({
      title: {
        text: '人力资源基础资源表'
      },
      // legend: {
      //   data: ['Allocated Budget', 'Actual Spending']
      // },
      radar: {
        // shape: 'circle',
        indicator: [
          { name: '考勤', max: 6500 },
          { name: '工资', max: 16000 },
          { name: '社保', max: 30000 },
          { name: '工作效率', max: 38000 },
          { name: '知识分享', max: 52000 },
          { name: '代码行数', max: 25000 }
        ]
      },
      series: [
        {
          name: 'Budget vs spending',
          type: 'radar',
          data: [
            {
              value: [4200, 3000, 20000, 35000, 50000, 18000]
            },
            {
              value: [5000, 14000, 28000, 26000, 42000, 21000]
            },
            {
              value: [4200, 14000, 20000, 26000, 50000, 18000]
            }
          ]
        }
      ]
    })
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>

</style>
